<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户页面</title>
    <!--1.引入bootstrap样式框架；-->
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">

    <!--2.引入angularJS分页样式的框架；-->
    <link rel="stylesheet" href="../angularjs/pagination.css">

    <link rel="stylesheet" href="../layer/theme/default/layer.css">

    <!--3.引入bootstrap中的Jquery框架；-->
    <script src="../bootstrap/js/jquery.min.js"></script>
    <!--4.引入bootstrap中的Js框架；-->
    <script src="../bootstrap/js/bootstrap.min.js"></script>

    <script src="//cdn.bootcss.com/angular.js/1.5.8/angular.min.js"></script>
    <script src="//cdn.bootcss.com/angular.js/1.5.8/angular-route.js"></script>

    <!--<script src="//unpkg.com/angular-ui-router@0.4.2/release/angular-ui-router.js"></script>-->
    <!--6.引入AngularJS分布的JS框架-->
    <script src="../angularjs/pagination.js"></script>

    <script src="../layer/layer.js"></script>

    <script>
        var app = angular.module('bankApp', []);
        app.controller('bankController', function ($scope, $http) {
           // var ukPhone = window.sessionStorage.getItem("ukPhone");
            $scope.list="";

            //zuul
            $http.post('http://localhost:12000/tran/ip').then(function (data) {  //正确请求成功时处理
                console.log(data)
                if (data.data.code == 403) {
                    window.location.href = "/login.html";
                }
            }).catch(function (result) { //捕捉错误处理
                console.info(result);
            });

            $scope.news = function () {
                $http.get("http://127.0.0.1:12000/user/user/queryBank?ukPhone="+window.sessionStorage.getItem("ukPhone")).success(function (data) {
                    console.log(data);
                    $scope.list=data.data
                    //$scope.bank = data;
                })
            }
        })

    </script>
</head>
<body ng-app="bankApp" ng-init="news()" ng-controller="bankController">
<div>
    <ol class="breadcrumb" style="margin-top: 0px;margin-bottom: 0;">
        <li><a >Home</a></li>
        <li><a >银行</a></li>
        <li><a href="/index.html">返回首页</a></li>
    </ol>
</div>
<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h1>银行卡</h1>
        </div>
        <div class="panel-body">


            <table class="table table-bordered table-hover table-striped table-condensed text-center">
                <tr>
                    <td >编号</td>
                    <td>银行卡账号</td>
                    <td>余额</td>
                    <td>状态</td>
                    <td>每日最大限额</td>
                    <td>操作</td>
                </tr>

                <tr ng-repeat="(key,v) in list">
                    <td>{{$.index+1}}</td>
                    <td>{{v.bankAccount}}</td>
                    <td>{{v.balance}}</td>

                    <!--<td>{{v.branchState}}</td>-->
                    <td ng-if="v.branchState == 0">
                        冻结
                    </td>
                    <td ng-if="v.branchState == 1">
                        正常
                    </td>

                    <td>{{v.quota}}</td>

                    <td>
                        <!--<a class="btn btn-primary" type="button" href="../deal.html ">明细</a>-->
                        <a class="btn btn-danger" type="button" href="../frozen.html">申请冻结</a>
                        <!--<a class="btn btn-primary" type="button" href="../transfer.html">汇款</a>-->
                    </td>
                </tr>


            </table>
        </div>
        <div class="panel-footer text-right">
            银行卡页面
        </div>
    </div>
</div>
</body>
</html>